package cn.kgc.controller;

import cn.kgc.pojo.Company;
import cn.kgc.service.CompanyService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class CompanyController {
    @Reference
    private CompanyService companyService;
    @RequestMapping("/saveCompany.json")
    @ResponseBody
    public Integer saveCompany(Company company){//保存公司信息
        Integer count=companyService.save(company);
        if(count>0){
            return 1;
        }else {
            return -1;
        }
    }
}
